How to repartition Spark dataframe depending on row count

join shbcf.ru